#pragma once
#include "Dictation.h"

class CDllRecvDict:public CDictation
{
    enum { eSend=0, eRecv };
    CEngine*      m_pEngine;
public:
	CDllRecvDict(void);
public:
	~CDllRecvDict(void);
public:
    bool HookWnd();
    bool UnHookWnd();


    bool OnAuther(OD_DATA *pOD);
	bool OnGetPlayerPosition(OD_DATA *pOD);
	bool OnStartAttack(OD_DATA *pOD);
	bool OnStopAttack(OD_DATA *pOD);
	bool OnGoToCity(OD_DATA *pOD);
	bool OnQuit(OD_DATA *pOD);
	CString OnGetUnitName(OD_DATA *pOD);
    CString OnGetPlayerName(OD_DATA *pOD);

    HANDLE RunThread();
    DWORD GetShareID(HANDLE hThread);
};

class CMainCtrl
{
    CDllRecvDict* m_h1;
    bool m_bRuning;
    static HWND m_hWndExe;
public:
    CMainCtrl();
    ~CMainCtrl();
    void Init(DWORD id);
    void DoWork();
    void Release();

    static DWORD GetShareMemory();
    HANDLE RunThread();
    DWORD GetShareID();


};